<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateYsSpendingTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('spending', function(Blueprint $table)
		{
			$table->bigInteger('id', true)->comment('主键id');
			$table->bigInteger('uid')->comment('用户id');
			$table->string('order_number', 32)->nullable()->comment('订单编号');
			$table->integer('recharge_time')->nullable()->comment('消费时间');
			$table->tinyInteger('type')->nullable()->default(0)->comment('消费类型');
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('spending');
	}

}
